<?xml version="1.0" encoding="ISO-8859-1" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:p="http://primefaces.org/ui"
	  xmlns:ui="http://java.sun.com/jsf/facelets">

	<ui:composition template="/templates/TemplateFacelets.xhtml">
		<ui:define name="content" >

			<h:form id = "dadosPessoa">
			
				<p:growl id="growl" showDetail="true" sticky="true" />  
			  
			    <p:panel header="Informe seus dados" style="background-color:#F3F3F3;">
			    	
			    
			  		<p:messages for="true"/>
			  		    
			        <h:panelGrid columns="3" cellpadding="5" >
			
			        	<p:outputLabel value="Nome:"  for="nome" />     
			            <p:inputText id ="nome" label="nome" value="#{pessoaBean.pessoa.nome}" required="true" />
			            <p:message for="nome" />                   
			        
			            <p:outputLabel value="Data de Nascimento: " for="nascimento" />  
			            <p:inputMask id = "nascimento" label = "nascimento" value="#{pessoaBean.novaData}"
			            mask="99/99/9999" required="true" />
			            <p:message for="nascimento" />
			            
			            <p:outputLabel value="Fone: " for="fone" />  
			            <p:inputMask id = "fone" label = "email" value="#{pessoaBean.pessoa.fone}" mask="(99) 9999-9999" required="true" />            	
			            <p:message for="fone" /> 
			              
			            <p:outputLabel value="Email: " for="email" />  
			            <p:inputText id="email" label = "email" value="#{pessoaBean.pessoa.email}" required="true"  />
			            <p:message for="email"/>
			            
			            <p:outputLabel value="Senha:" for="senha" />  
			            <p:password id="senha" label="Senha"  value="#{pessoaBean.pessoa.digest}" match="cSenha" required="true" feedback="true"/>
			            <p:message for="senha" />
			            
			            <p:outputLabel value="Confirmar Senha:" for="cSenha" />  
			            <p:password id="cSenha" label="Senha"  value="#{pessoaBean.pessoa.digest}" required="true" feedback="true"/>
			            <p:message for="cSenha" />
			            
			            <p:outputLabel value="Captcha:" for="caixa" />  	                
			            <p:captcha id="caixa" label="Captcha" language="pt" theme="blackglass"/>
			        	<p:message id="captchaMessage" for="caixa" />
			        </h:panelGrid>

			        
			          
			        
			        <h:commandButton value="Cadastrar" action="#{pessoaBean.salvar}" update="growl"/> 
			        <p:outputLabel value = "   "/>
			        <h:commandButton value="Limpar Campos" type="reset" />
			    </p:panel>
			</h:form>

		</ui:define>
	</ui:composition>
</html>